package com.example.administrator.myproject.home

import android.content.Intent
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout

import com.example.administrator.myproject.R

class MainFragment : Fragment() {
    private var recyclerView: RecyclerView? = null
    private var adapter: HomeAdapter? = null
    private var linearLayout: LinearLayout? = null
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        val view = inflater.inflate(R.layout.main, container, false)
        linearLayout = view.findViewById(R.id.merchant1) as LinearLayout
        linearLayout!!.setOnClickListener(View.OnClickListener {
            val intent = Intent()
            intent.setClass(activity, Cart_c::class.java)
            startActivity(intent)
        })

        return view
    }
}
